package com.evil.common.application.dto.process;

import com.evil.common.application.dto.process.node.NodeBaseDTO;
import com.evil.common.account.dto.user.UserEnterpriseDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 查询流程实例 请求实体
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ProcessTaskReqDTO {
    /**
     * 流程实例id
     */
    @NotBlank(message = "流程实例id不能为空")
    private String processInstanceId;

    /**
     * 实例节点
     */
    @NotNull(message = "实例节点不能为空")
    private NodeBaseDTO node;

    /**
     * 处理人
     */
    private UserEnterpriseDTO assignee;

    public ProcessTaskReqDTO(@NotBlank(message = "流程实例id不能为空") String processInstanceId, @NotNull(message = "实例节点不能为空") NodeBaseDTO node) {
        this.processInstanceId = processInstanceId;
        this.node = node;
    }
}
